Precompiling C++ for Garbage Collection
نویسنده
چکیده
Our research is concerned with compiler-independent, eecient and convenient garbage collection for C++. Most collectors proposed for C++ have either been implemented in a library or in a compiler. As an intermediate step between those two, this paper proposes using precompilation techniques to augment a C++ source program with code to allow mostly type-accurate garbage collection. There are two key precompiler transformations. The rst is automatic generation of smart pointer classes. The pre-compiler deenes the smart pointer classes and the user utilizes them instead of raw pointers. These smart pointers supply functionality that allows the collector to locate the root set for collection. The second transformation augments the C++ program with code that allows the garbage collector to locate internal pointers within objects. This paper describes the precompiler and the garbage collector. The paper includes a brief (1500 word) survey of related techniques.
منابع مشابه
Garbage Collection and Run-time Typing as a C++ Library
provide garbage collection. This paper proposes the use of \smart pointer" template classes as an interface for the use of garbage collection in C ++ . Template classes and operator overloading are techniques allowing language extension at the level of user code; I claim that using these techniques to create smart pointer classes provides a syntax for manipulating garbage-collected storage safe...
متن کاملGarbage Collection for Hard Real-Time Systems
This paper describes a scheme for garbage collection suitable for hard real-time applications. The approach supports both periodic high-priority processes and low-priority processes. Garbage collection work is done exclusively during execution of low-priority processes. A prototype garbage collector has been implemented for a C++ real-time kernel. The results confirms that high-priority process...
متن کاملGarbage Collection for Control Systems
This paper describes a scheme for garbage collection suitable for hard real-time applications. The approach supports both periodic high-priority processes and low-priority processes. Garbage collection work is done exclusively during execution of low-priority processes. A prototype garbage collector has been implemented for a C++ real-time kernel. The results confirms that high-priority process...
متن کاملDistributed from The Derivation of Termination Detection Algorithms Garbage Collection Schemes
A b s t r a c t . It is shown that the termination detection problem for distributed computations can be modeled as an instance of the garbage collection problem. Consequently, algorithms for the termination detection problem are obtained by applying trausformations to garbage collection algorithms. The transformation can be applied to collectors of the "mark-and-sweep" type as well as to refer...
متن کاملProposal to Acknowledge That Garbage Collection for C++ Is Possible X3j16/96-0114 Wg21/n0932
The ARM, "The C++ Programming Language (2nd edition)", and "The Design and Evolution of C++" all mention that automatic garbage collection of C++ is possible, but that an implementation is not required to provide a garbage collector. This is a proposal to make this explicit in the standard and to specify a couple of details of what it means to collect garbage. The proposal is for clarification ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1992